<?php echo $header; ?>
<?php if ($error_warning) { ?>
<div class="warning"><?php echo $error_warning; ?></div>
<?php } ?>
<div class="box">
  <div class="left"></div>
  <div class="right"></div>
  <div class="heading">
    <h1 style="background: url('view/image/information.png') 2px 9px no-repeat;"><?php echo $heading_title; ?></h1>
    <div class="buttons"><a onclick="$('#form').submit();" class="button"><span><?php echo $button_save; ?></span></a><a onclick="location = '<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a></div>
  </div>
  <div class="content">
    <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
      <div class="htabs">
        <?php foreach ($languages as $language) { ?>
        <a tab="#language<?php echo $language['language_id']; ?>"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /> <?php echo $language['name']; ?></a>
		<?php } ?>
      </div>
      <?php foreach ($languages as $language) { ?>
      <div id="language<?php echo $language['language_id']; ?>">
        <table class="form">
          <tr>
            <td><span class="required">*</span> <?php echo $entry_title; ?></td>
            <td><input name="title" size="100" value="<?php if(isset($title)) {echo $title;}else {echo '';}?>" />
              <?php if (isset($error_title)) { ?>
              <span class="error"><?php echo $error_title; ?></span>
              <?php } ?></td>
          </tr>
          <tr>
            <td><span class="required">*</span> <?php echo $entry_description; ?></td>
            <td><textarea name="description" id="description<?php echo $language['language_id']; ?>"><?php if(isset($description)) {echo $description;}else {echo '';}?></textarea>
              <?php if (isset($error_description)) { ?>
              <span class="error"><?php echo $error_description; ?></span>
              <?php } ?></td>
          </tr>
           <tr>
            <td><span class="required">*</span> <?php echo $entry_short;?></td>
            <td><textarea name="short_des" id="short_desc<?php echo $language['language_id']; ?>"><?php if(isset($short_des)) {echo $short_des;}else {echo '';}?></textarea>
              <?php if (isset($error_short)) { ?>
              <span class="error"><?php echo $error_short; ?></span>
              <?php } ?></td>
          </tr>
           <tr>
         	 <td><?php echo $entry_keyword; ?></td>
         	 <td><input type="text" name="keyword" value="<?php if(isset($keyword)) {echo $keyword;}else {echo '';}?>" /></td>
       	 </tr>
       	  <tr>
         	 <td>Meta Keyword : </td>
         	 <td><textarea name="meta_key" /><?php if(isset($meta_key)) {echo $meta_key;}else {echo '';}?></textarea></td>
       	 </tr>
       	  <tr>
         	 <td>Meta Description:</td>
         	 <td><textarea  name="meta_des" /><?php if(isset($meta_des)) {echo $meta_des;}else {echo '';}?></textarea></td>
       	 </tr>
        </table>
      </div>
	  <?php } ?>
    </form>
  </div>
</div>
<script type="text/javascript" src="view/javascript/ckeditor/ckeditor.js"></script>
<script type="text/javascript"><!--
<?php foreach ($languages as $language) { ?>
CKEDITOR.replace('description<?php echo $language['language_id']; ?>', {
	filebrowserBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserImageBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserFlashBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserImageUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserFlashUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>'
});
<?php } ?>
//--></script>
<script type="text/javascript"><!--
$.tabs('.htabs a'); 
//--></script>
<?php echo $footer; ?>